<template>
	<el-menu-item :index="menu.url">
		{{ menu.name }}

		<ChilrenMenu v-for="item in menu.children" :menu="item" :key="index"  @click.native="clickMenu(item)"></ChilrenMenu>
	</el-menu-item>
</template>

<script>
export default {
	name: 'ChilrenMenu',
	props: ['menu'],
	components: {},
	data() {
		return {};
	},
	methods: {
		clickMenu(item) {
			console.log(item)
			this.$store.commit('selectMenu', item);
		}
	},
	created() {}
};
</script>

<style>
.el-menu-item {
	background-color: #303a48 !important;
}
</style>
